<template>
  <div :class="{'card':true,'bgcard':bgbox}">
    <div class="title" :style="{ height: theight + 'px' }">
      <div class="select left">
        <slot name="left"></slot>
      </div>
      <img src="@/assets/title_left.png" width="40" height="9" alt="">
      {{ title }}
      <img src="@/assets/title_right.png" width="40" height="9" alt="">
      <div class="select right">
        <slot name="right"></slot>
      </div>
    </div>
    <div class="content">
      <slot name="content"></slot>
    </div>
  </div>
</template>

<script>
export default {
  props: ['title','theight','bgbox']
}
</script>

<style scoped lang="less">
.card {
  height: 100%;
  width: 100%;
  background-image: url("../assets/691.png");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  color: white;

  .title {
    font-size: 14px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 28px;
    text-align: center;
    position: relative;

    .select {
      position: absolute;
      top: 0;
    }

    .left {
      font-size: 14px;
      left: 0;
    }

    .right {
      right: 0;
      line-height: 32px;
      padding-right: 10px;
      font-size: 14px;
      color: #00eafa;
      cursor: pointer;
    }
  }

  .content {
    position: relative;
    font-size: 16px;
    height: 85%;
    margin: 0 10px 10px 10px;
    overflow: hidden;

    .btnGroup {
      z-index: 999;
      position: absolute;
      top: 5px;
      right: 10px;
      display: flex;
      flex-direction: row;
    }
  }
}

.bgcard {
  background-image: url("../assets/bgbox.png") !important;
}
</style>
